Skip to content

Conversation

confusedsushi
Copy link
Contributor

When sorting issues and pull requests by the nearest due date, the issues and PRs without a due date are currently sorted descending by their creation date. This seems counter intuitive to me. When sorting by nearest due date I want to see the issues/PRs in the order they should be worked on. For issues/PRs without a due date that order should be first come first served rather than last come first served.

This PR now changes the ordering of issues/PRs which don't have a due date to ascending by their creation date. So that the oldest is shown first and the newest last.

This now also makes the sort order nearest due date a true opposite to farthest due date. At farthest due date the newest is shown first and the oldest last.


Sponsored by Kithara Software GmbH

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 13, 2025
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Aug 13, 2025
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Aug 14, 2025
@lunny lunny added this to the 1.25.0 milestone Aug 14, 2025
@lunny lunny added the type/enhancement An improvement of existing functionality label Aug 14, 2025
@6543 6543 requested a review from delvh August 18, 2025 10:57
@6543
Copy link
Member

6543 commented Aug 18, 2025

I could have a conflict of interest reviewing this - might you wana review it instead ? - thx :)

@wxiaoguang
Copy link
Contributor

I think the root problem is here: #35200 (comment)

If this PR is the the same problem as the abused "deadline_unix" field, then it needs a complete fix, but not patch it.

@wxiaoguang wxiaoguang marked this pull request as draft August 29, 2025 16:12
@confusedsushi
Copy link
Contributor Author

I think the root problem is here: #35200 (comment)

If this PR is the the same problem as the abused "deadline_unix" field, then it needs a complete fix, but not patch it.

We noticed the abuse of deadline_unix and indeed this makes some problems. However this PR here is not touching the sorting of issues/PRs with a due date, here only the issues/PRs without a due date are affected. This PR here should be independent from solving the problem about the abuse of deadline_unix.

Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I see, you are absolutely right. It makes sense:

  • nearduedate: Asc("issue.created_unix")
  • farduedate: Desc("issue.created_unix")

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Aug 29, 2025
@wxiaoguang wxiaoguang marked this pull request as ready for review August 29, 2025 17:56
@wxiaoguang wxiaoguang added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 29, 2025
@lunny lunny merged commit dca375a into go-gitea:main Aug 30, 2025
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants